<template>   
  <TableDataList v-if="tableName" :dataSource="dataSource" v-model="tableName"/>
</template>

<script>
import TableDataList from './TableDataList.vue' 

export default {
  name: 'dm', 
  components:{
    TableDataList
  },
  data() {
    return {
      dataSource:'master',
      tableName:''
    }
  },
  watch:{
    $route(to){ 
      
      this.dataSource=to.params.dataSource
      this.tableName=to.params.tableName
    }
  },
  methods: { 
    onTableSelect(tableInfo){
     
     this.tableName=tableInfo.tableName
     this.$nextTick(()=>{ 
       this.$refs['TableDataListRef'].doSearch();
     })
     
   }
  },
  mounted() {  
    this.dataSource=this.$route.params.dataSource
    this.tableName=this.$route.params.tableName
  }
}

</script>

<style scoped>
</style>
